rm -rf *.jar
rm -rf *.xml

BASE_URL=https://global-application-saved.downline.cn/www.shu-pai.com/goods_image #下载地址

TOPSDK_VERSION=1.0.2 #通商云支付版本
COMMONS_VERSION=2.1.0 #commons包的版本号
COMMONS_JRA_URL=$BASE_URL/shupai_commons-$COMMONS_VERSION.jar #补全路径
TOPSDK_JRA_URL=$BASE_URL/top-sdk-java-$TOPSDK_VERSION.jar #补全路径
echo "$COMMONS_JRA_URL
$TOPSDK_JRA_URL"

#防止下载不成功的时候,可以覆盖到本地, 直接COPY到本地
curl -o cn/shupai/shupai_commons/2.1.0/shupai_commons-$COMMONS_VERSION.jar $COMMONS_JRA_URL

curl -O $COMMONS_JRA_URL & curl -O $TOPSDK_JRA_URL & curl -O $BASE_URL/pom.xml # 下载jar包
ls *.jar # 查看.jar结尾的文件列表

mvn install:install-file "-Dfile=shupai_commons-$COMMONS_VERSION.jar" "-DgroupId=cn.shupai" "-DartifactId=shupai_commons" "-Dversion=$COMMONS_VERSION" "-Dpackaging=jar" "-DpomFile=pom.xml"  # 下载到本地maven仓库并配置相关版本信息
mvn install:install-file "-Dfile=top-sdk-java-$TOPSDK_VERSION.jar" "-DgroupId=com.allinpay.sdk" "-DartifactId=top-sdk-java" "-Dversion=$TOPSDK_VERSION" "-Dpackaging=jar"  # 下载到本地maven仓库并配置相关版本信息

# 运行结束保持窗口不关闭
exec /bin/bash